<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <link rel="stylesheet" href="__PUBLIC__/Admin/css/base.css"/>
    <link rel="stylesheet" href="__PUBLIC__/Admin/css/info-mgt.css"/>
    <link rel="stylesheet" href="__PUBLIC__/Admin/css/WdatePicker.css"/>
    <title>移动办公自动化系统</title>
    <style type='text/css'>
        table tr .cb {
            width: 63px;
            text-align: center;
        }

        table tr .id {
            width: 63px;
            text-align: center;
        }

        table tr .name {
            width: 118px;
            padding-left: 17px;
        }

        table tr .nickname {
            width: 63px;
            padding-left: 17px;
        }

        table tr .dept_id {
            width: 63px;
            padding-left: 13px;
        }

        table tr .sex {
            width: 63px;
            padding-left: 13px;
        }

        table tr .birthday {
            width: 80px;
            padding-left: 13px;
        }

        table tr .tel {
            width: 113px;
            padding-left: 13px;
        }

        table tr .email {
            width: 160px;
            padding-left: 13px;
        }

        table tr .addtime {
            width: 160px;
            padding-left: 13px;
        }

        table tr .operate {
            padding-left: 13px;
        }
    </style>
</head>

<body>
<div class="title"><h2>信息管理</h2></div>
<div class="table-operate ue-clear">
    <a href="javascript:;" class="add">添加</a>
    <a href="javascript:;" class="del">删除</a>
    <a href="javascript:;" class="edit">编辑</a>
    <a href="__CONTROLLER__/charts" class="count">统计</a>
    <a href="javascript:;" class="check">审核</a>
</div>
<div class="table-box">

    <table>
        <thead>
        <tr>
            <th class="cb"></th>
            <th class="id">序号</th>
            <th class="name">用户名</th>
            <th class="nickname">昵称</th>
            <th class="dept_id">所属部门</th>
            <th class="sex">性别</th>
            <th class="birthday">生日</th>
            <th class="tel">电话</th>
            <th class="email">邮箱</th>
            <th class="addtime">添加时间</th>
            <th class="operate">操作</th>
        </tr>
        </thead>
        <tbody>
        <volist name='mDatas' id='vol'>
            <tr>
                <td class="cb">
                    <input type="checkbox" class="checkbox" value="{$vol.id}"/>
                </td>
                <td class="id">{$vol.id}</td>
                <td class="name">{$vol.username}</td>
                <td class="nickname">{$vol.nickname}</td>
                <td class="dept_id">{$vol.deptname|msubstr=0,5}</td>
                <td class="sex">{$vol.sex}</td>
                <td class="birthday">{$vol.birthday}</td>
                <td class="tel">{$vol.tel}</td>
                <td class="email">{$vol.email}</td>
                <td class="addtime">{$vol.addtime|date='Y-m-d H:i:s',###}</td>
                <td class="operate"><a href="__CONTROLLER__/edit/id/{$vol.id}">编辑&nbsp|&nbsp</a>
                    <a href="#" onClick="return disp_confirm('{$vol.id}')">删除</a>
                </td><!--removeFromCart('${item.product.pid}')-->
            </tr>
        </volist>
        </tbody>
    </table>
</div>
<div class="pagination ue-clear">
    <div class="pagin-list">
        {$show}
    </div>
    <div class="pxofy">显示第 1 条到 10 条记录，总共{$count}条记录</div>
</div>
</body>
<script type="text/javascript" src="__PUBLIC__/Admin/js/jquery.js"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/js/common.js"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/js/WdatePicker.js"></script>
<script type="text/javascript">
    $(".select-title").on("click", function () {
        $(".select-list").hide();
        $(this).siblings($(".select-list")).show();
        return false;
    })
    $(".select-list").on("click", "li", function () {
        var txt = $(this).text();
        $(this).parent($(".select-list")).siblings($(".select-title")).find("span").text(txt);
    })

    function disp_confirm(id) {
        if (confirm("你确定要删除?")) {
            // alert('__CONTROLLER__/delete/id/' + id);
            location.href = "__CONTROLLER__/delete/id/" + id;
        }
    }

    $(function () {
        $('.del').on('click', function () {

            var number = '';
            if ($("input[type='checkbox']:checked").length == 0) {
                alert('请选中要删除的用户');
                return;
            }
            $('input:checkbox:checked').each(function (k) {
                if (k == 0) {
                    number = $(this).val();
                } else {
                    number += ',' + $(this).val();
                }
            });
            location.href = "__CONTROLLER__/delete/id/" + number;
        });
    });
    // $('.pagination').pagination(100,{
    // 	callback: function(page){
    // 		alert(page);
    // 	},
    // 	display_msg: true,
    // 	setPageNo: true
    // });

    $("tbody").find("tr:odd").css("backgroundColor", "#eff6fa");

    showRemind('input[type=text], textarea', 'placeholder');
</script>
</html>
